import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public class LambdaDemo04 {
    public static void main(String[] args) {
        List<String> names = Arrays.asList("zhang3","li4","wang5");
        List<String> list = names.stream().filter(s->s.startsWith("zhang")).collect(Collectors.toList());
        for (String s : list){
            System.out.println("s = " + s);
        }

        //
        names.stream().forEach(s-> System.out.println(s));
    }
}
